package adv2;

import java.util.ArrayList;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class ListTest4 {
    public static void main(String[] args) {
        List<Teacher> l=new ArrayList<>();
        l.add(new Teacher("张三",5,"物理"));
        l.add(new Teacher("张4",15,"化学"));
        l.add(new Teacher("laozhang",25,"体育"));
        l.add(new Teacher("小宋",3,"化学"));
        l.add(new Teacher("小李",4,"化学"));
        Teacher teacher = new Teacher("小李", 4, "化学");
        System.out.println(l.contains(teacher));
        System.out.println(l);
    }
}
